/*
 * @Author: ylyu
 * @Date: 2024-02-21 20:32:37
 * @LastEditors: ylyu
 * @LastEditTime: 2024-02-23 15:05:43
 * @Description: 渲染进程
 */
console.log('preload!!!')
const { contextBridge, ipcRenderer } = require('electron')

const sendUrl = async (url) => {
  const res = await ipcRenderer.invoke('on-url-event', url)
  console.log(res)
  return res // 传给dialog
}
contextBridge.exposeInMainWorld('myApi', {
  sendUrl,
})
